package com.platform.system.enums;

public enum VipStatusEnum {
    NO_PURCHASE(0, "未购买"),
    PURCHASED(1, "已购买");

    private final int code;
    private final String descp;

    VipStatusEnum(int code, String descp) {
        this.code = code;
        this.descp = descp;
    }

    public int getCode() {
        return code;
    }

    public String getDescp() {
        return descp;
    }

    public static VipStatusEnum of(Integer code) {
        for (VipStatusEnum item : VipStatusEnum.values()) {
            if (item.getCode() == code) return item;
        }
        return null;
    }
}
